package com.sdp.wx.db.wx_wz_inventory_detail.service.impl;

import com.sdp.wx.db.wx_wz_inventory_detail.entity.WxWzInventoryDetail;
import com.sdp.wx.db.wx_wz_inventory_detail.mapper.WxWzInventoryDetailMapper;
import com.sdp.wx.db.wx_wz_inventory_detail.service.IWxWzInventoryDetailService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zsp
 * @since 2024-01-31
 */
@Service
public class WxWzInventoryDetailServiceImpl extends ServiceImpl<WxWzInventoryDetailMapper, WxWzInventoryDetail> implements IWxWzInventoryDetailService {

	@Override
	public List<WxWzInventoryDetail> queryWzInventoryDetailByInventoryId(String inventoryId) {
		LambdaQueryWrapper<WxWzInventoryDetail> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(WxWzInventoryDetail::getInventoryId,inventoryId);
		return list(queryWrapper);
	}

	@Override
	public void removeWzInventoryDetailByInventoryId(String inventoryId) {
		LambdaQueryWrapper<WxWzInventoryDetail> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(WxWzInventoryDetail::getInventoryId,inventoryId);
		remove(queryWrapper);
	}

}
